<template>
    <div class="personal-container">
        <el-row type="flex" class="row-bg" justify="center">
            <el-col :span="14">
                <div class="user">
                        <img src="../assets/login-bg.jpg" class="avatar" alt="">
                </div>
            </el-col>
            <el-col  :span="16">
                <div class="userinfo">
                    <div class="user-item">
                        <i class="el-icon-user"></i>
                        <span>{{user.name}}</span>
                    </div>
                    <div class="user-item">
                        <i class="el-icon-setting"></i>
                        <span>{{user.identity  == 'admin' ? "管理员" : "员工"}}</span>
                    </div>
                </div>
            </el-col>
        </el-row>
    </div>
</template>
<script>
export default {
    name:"personal",
    computed: {
        user() {
            return this.$store.getters.user
        }
    }
}
</script>
<style scoped lang="less">
.personal-container {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  /* padding: 16px; */
}
.row-bg {
  width: 100%;
  height: 100%;
}
.user {
  text-align: center;
  position: relative;
  top: 30%;
}
.user img {
  width: 150px;
  border-radius: 50%;
}
.user span {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 20px;
  font-weight: bold;
}
.userinfo {
  height: 100%;
  width: 100%;
  background-color: #eee;
}
.user-item {
  position: relative;
  top: 30%;
  padding: 26px;
  font-size: 28px;
  color: #333;
}
</style>

